package org.example.queueadmin.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;

@Configuration
public class RedisConfig {
  @Bean
  public RedisTemplate<String, byte[]> redisBytesTemplate(LettuceConnectionFactory cf) {
    RedisTemplate<String, byte[]> t = new RedisTemplate<>();
    t.setConnectionFactory(cf);
    return t;
  }
  @Bean
  public RedisTemplate<String, String> redisStringTemplate(LettuceConnectionFactory cf) {
    RedisTemplate<String, String> t = new RedisTemplate<>();
    t.setConnectionFactory(cf);
    return t;
  }
}

